﻿using KWT.DRG_DIP.DO.System;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace KWT.DRG_DIP.PO.Basic
{
    /// <summary>
    /// 卡密
    /// </summary>
    [Index(nameof(Value), IsUnique = true)]
    public class Sys_SecretKey : Audit
    {
        /// <summary>
        /// 主键
        /// </summary>
        [Key]

        public string KeyID { get; set; }
        /// <summary>
        /// 用户主键
        /// </summary>

        public string UserID { get; set; }
        /// <summary>
        /// 批次
        /// </summary>
        public string Batch { get; set; }
        /// <summary>
        /// 值
        /// </summary>
        public string Value { get; set; }
        /// <summary>
        /// 状态
        /// 0.未使用
        /// 1.已使用
        /// -1.已过期
        /// -2.已作废
        /// -99.已禁用
        /// </summary>
        public int Status { get; set; }
        /// <summary>
        /// 过期时间
        /// </summary>
        public DateTime ExpireTime { get; set; } = DateTime.Now.AddDays(30);

        /// <summary>
        /// 配额
        /// </summary>
        public int Quota { get; set; }
        /// <summary>
        /// 卡密名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// -1.年
        /// 0.月
        /// 1.日
        /// 2.小时
        /// 3.分钟
        /// </summary>
        public int Type { get; set; }
        /// <summary>
        /// 0.
        /// 1.
        /// 2.
        /// </summary>
        public int Category { get; set; }
        public int Number { get; set; }
        public int AIQuota { get; set; }
        public int AIType { get; set; }
    }
}
